Skip to content

TUI upgrades: clipboard copy, image paste UX, minions theme#2

Closed
pippenz wants to merge 12 commits intocodingagentsystem:mainfrom
pippenz:tui-upgrades
Closed

TUI upgrades: clipboard copy, image paste UX, minions theme#2
pippenz wants to merge 12 commits intocodingagentsystem:mainfrom
pippenz:tui-upgrades

Conversation

@pippenz
Copy link
Copy Markdown

@pippenz pippenz commented Mar 20, 2026

Summary

  • OSC 52 clipboard copy — Mouse selection in any pane now copies to system clipboard via OSC 52 terminal escape sequence (daemon is headless, can't use arboard directly)
  • Auto-inject on image paste — Dropping/pasting an image into a pane automatically enters inject mode so you can immediately type context
  • Minions theme — Opt-in theme ([theme] variant = "minions") with minion character names (Kevin, Stuart, Bob, Gru...), yellow/denim-blue palette, banana/goggle emoji icons, and minion ASCII art boot screen
  • Test fixes — Fixed drain_clears_pending_notifications (Tokio socket reactor registration), added 16 new tests for OSC 52, ThemeVariant, ColorPalette::minions(), MinionsIcons

Test plan

  • Full test suite passes (~1,620 tests, 0 regressions)
  • OSC 52 helper: base64 encoding, empty, unicode, multiline round-trip
  • ThemeVariant: serde, Display, FromStr, config wiring
  • Minions palette: yellow primary, denim blue info, differs from dark, preserves base
  • MinionsIcons: non-empty, differ from default circles
  • Minion names: 20 canonical worker names + 3 supervisor names
  • drain_clears_pending_notifications: now passes consistently

🤖 Generated with Claude Code

pippenz and others added 12 commits March 17, 2026 09:08
- Add custom option_i32/option_u8 serde deserializers so MCP count
  fields accept numbers sent as floats (e.g. 3.0) from Claude Code
- Fix notify_rx ref mut in factory lifecycle to allow mutable drain/recv
- Refactor DaemonNotifier socket to lazy tokio conversion (std socket
  bound before Tokio runtime, converted on first async use)
- Use gcc linker instead of clang for local build
….json

Workers were only getting Bash(cas :*) permissions in their generated
settings.json, leaving mcp__cas__* tools unallowed. This required
unreliable fallback to the global ~/.claude/settings.json.

Add get_cas_mcp_permissions() alongside get_cas_bash_permissions() and
merge both into the permissions.allow array in get_cas_hooks_config().

The 10 MCP tools added: task, coordination, memory, search, rule, skill,
spec, verification, system, pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When workers use isolated git worktrees, .mcp.json must be committed to git
or it won't appear in their checkout — leaving them with no MCP tools and
silently idle.

Changes:
- preflight_factory_launch(): add git ls-files check for .mcp.json.
  Hard failure when workers > 0; advisory notice when supervisor-only.
  Quick-start steps show 'git add .mcp.json && git commit' when only
  .mcp.json is missing (not duplicated if .claude/ is also missing).
- queue_codex_worker_intro_prompt(): inject MCP fallback instructions for
  Claude workers at startup. Tells workers to check .mcp.json, run
  'cas init -y' to regenerate it, and notify supervisor via
  'cas factory message' if MCP tools are unavailable — preventing
  silent idle loops.

Closes cas-8397 (based on spike cas-4567).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hand-written option_u8/option_i32 deserializers with a single
option_numeric_deser! macro generating 6 variants (u8, i32, i64, u32,
usize, u64). Apply to all ~30 Option<numeric> fields across MCP request
types so Claude Code's string-encoded numbers ("3") are accepted
alongside native JSON numbers (3).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- handle_mouse_up() returns selected text instead of calling arboard
  directly (daemon is headless, can't access system clipboard)
- Daemon relays selected text to client terminal via OSC 52 escape
  sequence for native clipboard write
- Auto-enter inject mode after image drop so user can immediately
  type context for pasted images

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…reen

Adds a "minions" theme variant selectable via `[theme] variant = "minions"`
in config.toml. When active: workers get minion names (kevin, stuart, bob),
supervisor is named gru/dru/nefario, the color palette shifts to yellow
primary with denim blue accents, and the boot screen shows a minion ASCII
art logo with "BANANA!" ready message and "Bee-do Bee-do" launch animation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… test compilation

- Replace generic box ASCII art with recognizable minion character (pill
  body, goggles with eyes, overalls, "BANANA" text)
- Wire MinionsIcons (banana/eye/sleep emoji) into agent_status_icon() and
  agent_status_icon_simple() via is_minions() theme flag
- Add missing minions_theme field to test_config() in core.rs and
  factory_integration.rs
- Fix pre-existing mut warnings in notify.rs tests (lines 132, 155)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Redesign MINION_LOGO with better pill-shaped body silhouette,
  symmetric goggle strap, arm stubs (─┤/├─), and cleaner feet
- Replace 8 non-canonical worker names (larry, tom, chris, john, paul,
  mike, ken, donny) with actual Minion film characters (jorge, otto,
  steve, herb, pete, donnie, abel, walter)
- Add otto (main character from Minions: The Rise of Gru)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The test was failing because try_recv on a Tokio UnixDatagram requires
the socket to be registered with the reactor first. Added an initial
recv().await call before the drain test sequence to ensure the Tokio
socket is properly registered.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- OSC 52: base64 encoding, empty string, unicode, multiline round-trip
- ThemeVariant: default value, Display, FromStr, serde round-trip
- ActiveTheme: minions config wiring, is_minions() check
- ColorPalette::minions(): yellow primary, denim blue info, differs
  from dark, preserves base bg
- MinionsIcons: non-empty constants, differ from default circles

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Thank you for your interest in CAS! We appreciate you taking the time to contribute.

CAS is source-available but does not accept pull requests at this time. Instead, please:

See CONTRIBUTING.md for more details on how to participate.

@github-actions github-actions bot closed this Mar 20, 2026
pippenz added a commit to pippenz/cas that referenced this pull request Mar 30, 2026
Fix codingagentsystem#1 — Idle message dedup: Add per-worker rate limiting (5 min) for
idle-like messages in process_prompt_queue(). Detects common idle
patterns ("standing by", "ready for task", "MCP tools unavailable",
"idle", "awaiting instructions", etc.) and suppresses duplicates.

Fix codingagentsystem#2 — Stale messages: Dead worker filtering was already in place
via is_dead_worker_source() and the dead_workers HashSet (populated on
both crash and shutdown). No additional changes needed — verified the
existing filter covers both paths.

New: is_idle_message() helper with unit tests for pattern matching.
New: last_idle_message_times HashMap on FactoryDaemon for per-worker
rate tracking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant